<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="html" indent="yes"/>
    <xsl:template match="/">

        <xsl:choose>
            <xsl:when test="count(//store) = 0">
               Pas de magasin !!
            </xsl:when>
            <xsl:otherwise>

                <table class="listeComptes">
                    <tr>
                        <td>
                            <b>Nom magasin</b>
                        </td>
                        <td>
                            <b>Ville</b>
                        </td>
                        <td>
                            <b>Compte</b>
                        </td>
                        <td>
                            <b>Solde</b>
                        </td>
                    </tr>

                    <xsl:for-each select="//store">
                        <tr>
                            <td>
                                <xsl:value-of select="name" />
                            </td>
                            <td>
                                <xsl:value-of select="city" />
                            </td>
                            <td>
                                <xsl:value-of select="account/name" />
                            </td>
                            <td>
                                <a style="padding:9px;" href="{concat('../secured/StoreMgt.do?id=', @id)}">
                                    <img border="0" src="../images/edit.gif"></img>
                                </a>
                                <a style="padding:9px;" href="{concat('../secured/RemoveStore.do?id=', @id)}">
                                    <img border="0" src="../images/delete.gif"></img>
                                </a>
                            </td>
                        </tr>
                    </xsl:for-each>
                </table>
            </xsl:otherwise>
        </xsl:choose>




    
    </xsl:template>
</xsl:stylesheet>